<template>
  <div>
    <h2 ref="title2">你好</h2>
    <button @click="showTitle">测试</button>
  </div>
  <Person ref="people"/>
</template>

<script lang="ts" setup name="App">
import Person from './components/Preson.vue'
import {ref} from 'vue'

let title2 = ref();
let people = ref();

function showTitle() {
  console.log(title2.value);
  console.log(people.value);
}
</script>

<style scoped>
/* css样式 */
div {
  background-color: #ddd;
  box-shadow: 0 0 10px #000;
  border-radius: 10px;
  padding: 20px;
}
</style>